package com.zhongli.devplatform.mapper.common;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhongli.devplatform.po.sys.ReadUserAdminPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author WuXiCheng
 * @version 1.0
 * @date 2020/7/23 10:12
 */
@Mapper
public interface ReadUserAdminMapper extends BaseMapper<ReadUserAdminPO> {
    /**
     * 根据用户名密码查询分页
     * @param accountNum
     * @param password
     * @return
     */
    ReadUserAdminPO findFirstByAccountNumAndPassword(@Param("accountNum") String accountNum, @Param("password") String password);

    /**
     * 逻辑删除
     * @param id
     * @return
     */
    int updateIsDeleteById(@Param("id") Integer id);

    /**
     * 重置密码
     * @param updatedPassword
     * @param accountNum
     * @return
     */
    int updatePasswordByAccountNum(@Param("updatedPassword") String updatedPassword, @Param("accountNum") String accountNum);

}